1 /*
2 
3 Boost Software License - Version 1.0 - August 17th, 2003
4 
5 Permission is hereby granted, free of charge, to any person or organization
6 obtaining a copy of the software and accompanying documentation covered by
7 this license (the "Software") to use, reproduce, display, distribute,
8 execute, and transmit the Software, and to prepare derivative works of the
9 Software, and to permit third-parties to whom the Software is furnished to
10 do so, all subject to the following:
11 
12 The copyright notices in the Software and this entire statement, including
13 the above license grant, this restriction and the following disclaimer,
14 must be included in all copies of the Software, in whole or in part, and
15 all derivative works of the Software, unless such copies or derivative
16 works are solely in the form of machine-executable object code generated by
17 a source language processor.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
22 SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
23 FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
24 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 DEALINGS IN THE SOFTWARE.
26 
27 */ 
28 
29 module derelict.glib.gtimer;
30 
31 import derelict.glib.gtypes;
32 import derelict.glib.glibconfig;
33 
34 extern (C):
35 
36 alias _GTimer GTimer;
37 
38 struct _GTimer;
39 
40 version(Derelict_Link_Static)
41 {
42     extern( C ) nothrow 
43     {
44 	    GTimer* g_timer_new();
45         void g_timer_destroy(GTimer* timer);
46         void g_timer_start(GTimer* timer);
47         void g_timer_stop(GTimer* timer);
48         void g_timer_reset(GTimer* timer);
49         void g_timer_continue(GTimer* timer);
50         gdouble g_timer_elapsed(GTimer* timer, gulong* microseconds);
51         void g_usleep(gulong microseconds);
52         void g_time_val_add(GTimeVal* time_, glong microseconds);
53         gboolean g_time_val_from_iso8601(const(gchar)* iso_date, GTimeVal* time_);
54         gchar* g_time_val_to_iso8601(GTimeVal* time_);
55     }
56 }
57 else
58 {
59     extern( C ) nothrow 
60     {
61 	    alias da_g_timer_new = GTimer* function();																
62         alias da_g_timer_destroy = void function(GTimer* timer);												
63         alias da_g_timer_start = void function(GTimer* timer);													
64         alias da_g_timer_stop = void function(GTimer* timer);													
65         alias da_g_timer_reset = void function(GTimer* timer);													
66         alias da_g_timer_continue = void function(GTimer* timer);												
67         alias da_g_timer_elapsed = gdouble function(GTimer* timer, gulong* microseconds);						
68         alias da_g_usleep = void function(gulong microseconds);													
69         alias da_g_time_val_add = void function(GTimeVal* time_, glong microseconds);							
70         alias da_g_time_val_from_iso8601 = gboolean function(const(gchar)* iso_date, GTimeVal* time_);			
71         alias da_g_time_val_to_iso8601 = gchar* function(GTimeVal* time_);										
72     }
73 
74     __gshared
75     {
76         da_g_timer_new g_timer_new; 
77         da_g_timer_destroy g_timer_destroy; 
78         da_g_timer_start g_timer_start; 
79         da_g_timer_stop g_timer_stop; 
80         da_g_timer_reset g_timer_reset; 
81         da_g_timer_continue g_timer_continue; 
82         da_g_timer_elapsed g_timer_elapsed; 
83         da_g_usleep g_usleep; 
84         da_g_time_val_add g_time_val_add; 
85         da_g_time_val_from_iso8601 g_time_val_from_iso8601; 
86         da_g_time_val_to_iso8601 g_time_val_to_iso8601; 
87     }
88 }